As conventional technique, a time synchronization system including a time synchronization client and a time synchronization server exists. The time synchronization server provides a high precision reference time. The time synchronization client communicates with the time synchronization server via a network, and synchronizes a local time thereof with the reference time.
In this system, when a packet for synchronization (For example, a synchronization request packet and a synchronization reply packet) is made a round trip between the time synchronization client and the time synchronization server, the time synchronization client calculates a round trip time 2d of the packet.
When the packet for synchronization is made a round trip between the time synchronization client and the time synchronization server, if a network delay time of the packet on an outward way from the time synchronization client to the time synchronization server is equal to a network delay time of the packet on a return way from the time synchronization server to the time synchronization client, a local time of the time synchronization client can be synchronized with “(reference time of the time synchronization server)+(round trip time (2d)÷2)”.
On the other hand, if a network delay time of the synchronization request packet is not equal to a network delay time of the synchronization reply packet, a local time (of the time synchronization client) calculated by above-mentioned equation includes an error. Briefly, even if the round trip time is simply divided by two, this division result is not equal to a transmission time of one way.
Accordingly, in order to preciously synchronize the local time with the reference time, when the packet for synchronization is made a round trip between the time synchronization client and the time synchronization server, a network delay time of the synchronization request packet had better be equal to a network delay time of the synchronization replay packet as much as possible.
In this system, the time synchronization client and the time synchronization server communicate via a general network device (For example, IP router/switch). Accordingly, in the network device, the packet for synchronization and other packets are mixed. Briefly, on the network, a first another device (except for the time synchronization client and the time synchronization server) transmits/receives another packet (different from the packet for synchronization) with a second another device via the network device. Here, transmission/receiving of another packet are often performed at the same time of transmission/receiving of the packet for synchronization.
In this way, at the network device on a communication path between the time synchronization client and the time synchronization server, when the packet for synchronization (transmitted by the time synchronization client) competes with another packet (transmitted by another device), this case becomes the reason why a network delay time of the synchronization request packet is not equal to a network delay time of the synchronization reply packet.
Especially, in transmission of store and forward type used by the network device, until transmission of a packet (being outputted) is completed, transmission of a next packet cannot be started. Accordingly, if another packet (transmitted by another device) is inputted to the network device before the packet for synchronization (transmitted by the time synchronization client) is inputted to the network device, the packet for synchronization is outputted from the network device after waiting output of another packet. As a result, at the network device, a wait time to transmit the packet for synchronization occurs. In this case, for example, if the wait time occurs at transmission of the packet on an outward way from the time synchronization client to the time synchronization server, and if the wait time does not occur at transmission of the packet on a return way from the time synchronization server to the time synchronization client, a difference of the transmission time between the outward way and the return way occurs. Furthermore, if the wait time of the outward way is different from the wait time of the return way, the difference of the transmission time between the outward way and the return way also occurs.
In conventional technique, in order to avoid occurrence of the wait time at the network device, the time synchronization client transmits the packet for synchronization by shifting from a timing when another device transmits another packet.
However, in this technique, when traffic of the network becomes large, i.e., when another device frequently transmits another packet, occurrence of the wait time at the network device cannot be avoided.